<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang='en'>
<head>
	<meta charset='utf-8' />
	<title>广溢信息技术有限公司</title>
	<meta content='' name='description' />
	<meta content='' name='author' />
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<!-- Bootstrap -->
	<link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet" >
    <link href="__PUBLIC__/css/jquery-ui-1.9.2.custom.css" rel="stylesheet" />
	<link href="__PUBLIC__/css/font-awesome.min.css" rel="stylesheet" >

	<!--[if IE 7]>
		<link  href="__PUBLIC__/css/font-awesome-ie7.min.css" rel="stylesheet">
	<![endif]-->

	<!--[if lt IE 9]>
		<link type="text/css" href="__PUBLIC__/css/custom-theme/jquery.ui.1.9.2.ie.css"  rel="stylesheet" />
	<![endif]-->

	<link href="__PUBLIC__/css/bootstrap-responsive.css" rel="stylesheet">
	<link href="__PUBLIC__/css/test.css" rel="stylesheet">
	<script src="__PUBLIC__/js/jquery.js"></script>

	<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
	<!--[if lt IE 9]>
	<script src="__PUBLIC__/js/html5shiv.js"></script>
	<script src="__PUBLIC__/js/respond.min.js"></script>
	<![endif]-->
	<script type="text/javascript">
	var upload_url="<?php echo U('file/upload?module='.MODULE_NAME);?>";
	var del_url="<?php echo U('File/del');?>";
	var session_id="<?php echo session_id();?>";	
	var _hmt = _hmt || [];
	(function() {
	  var hm = document.createElement("script");
	  hm.src = "//hm.baidu.com/hm.js?2a935166b0c9b73fef3c8bae58b95fe4";
	  var s = document.getElementsByTagName("script")[0]; 
	  s.parentNode.insertBefore(hm, s);
	})();
</script>
</head>
<body>
	<div class="shade"></div>
	<div class="row-fluid navbar visible-phone">
	<div class="row-fluid">
		<a class="brand" href="<?php echo U('home/index');?>">广溢网络</a>
		<a data-toggle="collapse" data-target="#top_menu" class="right">
		<i class="brand icon-th-list"></i>
		</a>
	</div>
	<div class="col-lapse" id="top_menu">
		<ul class="nav nav-pills">
			<?php if(is_array($list_top_menu)): $i = 0; $__LIST__ = $list_top_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$tag): $mod = ($i % 6 );++$i;?><li>
					<a  href="#" url="<?php echo U($tag['url']);?>" node="<?php echo ($tag["id"]); ?>" onclick="click_top_menu(this)"><?php echo ($tag["name"]); ?></a>
				</li><?php endforeach; endif; else: echo "" ;endif; ?>
		</ul>
	</div>
</div>
<div class="row-fluid navbar hidden-phone">
	<a class="brand" href="<?php echo U('home/index');?>">广溢网络</a>
	<ul class="nav nav-pills">
		<?php if(is_array($list_top_menu)): $i = 0; $__LIST__ = $list_top_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$tag): $mod = ($i % 6 );++$i;?><li>
				<a  href="#" url="<?php echo U($tag['url']);?>" node="<?php echo ($tag["id"]); ?>" onclick="click_top_menu(this)"><?php echo ($tag["name"]); ?></a>
			</li><?php endforeach; endif; else: echo "" ;endif; ?>
	</ul>
	<aside>
		<span>
			<a href="<?php echo U('UserConfig/index');?>">设置</a>
		</span>
		<span>
			<a href="<?php echo U('profile/index');?>"><?php echo (session('user_name')); ?></a>
		</span>
		<span>
			<a href="<?php echo U('login/logout');?>">退出</a>
		</span>
		&nbsp;&nbsp;
	</aside>
</div>

	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span3 left_menu">
				<div class="visible-phone">
	<h4 class="btn no-border" data-toggle="collapse" data-target="#left_menu">		
			<?php echo ($top_menu_name); ?><i class="icon-angle-down"></i>
		</h4>
	<div class="col-lapse" id="left_menu"><?php echo ($html_left_menu); ?></div>
</div>
<div class="hidden-phone">
	<h4><?php echo ($top_menu_name); ?></h4>
	<div><?php echo ($html_left_menu); ?></div>
</div>
			</div>
			<div class="span9 content">
<script type="text/javascript" src="__PUBLIC__/editor/kindeditor.js"></script>
<script type="text/javascript" src="__PUBLIC__/editor/kindeditor.setting.js"></script>
<script type="text/javascript">

	function approve() {
		sendForm("form_confirm", "<?php echo U('approve');?>","<?php echo U('read?id='.$vo['id']);?>");
	}

	function reject() {
		sendForm("form_confirm", "<?php echo U('reject');?>","<?php echo U('read?id='.$vo['id']);?>");
	}

	function save(step) {
		$("#confirm").val("");
		$("#confirm_wrap  span").each(function() {
			$("#confirm").val($("#confirm").val() + $(this).attr("emp_no") + '|');
		})

		$("#consult").val("");
		$("#consult_wrap  span").each(function() {
			$("#consult").val($("#consult").val() + $(this).attr("emp_no") + '|');
		})

		$("#refer").val("");
		$("#refer_wrap  span").each(function() {
			$("#refer").val($("#refer").val() + $(this).attr("emp_no") + '|');
		})
		if ($("#confirm").val().length < 2) {
			alert('请选择审批流程');
			return
		}
		$("#step").val(step);
		editor.sync();
		sendForm("form_data", "<?php echo U('save');?>");
	}

	function select_confirm() {
		winopen("<?php echo U('popup/confirm');?>", 900, 750);
	};

	$(document).ready(function() {
		$("#confirm span").live("dblclick", function() {
			$("#confirm span").last().find("b").remove();
		});
		$("#consult span").live("dblclick", function() {
			$("#consult span").last().find("b").remove();
		});
		show_content();
	}); 
</script>
<style type="text/css">
	#content_1{
		display:none;
	}
</style>
<div class="flow">
    <div class="row-fluid title">
        <span><?php echo ($flow_type["name"]); ?>:<?php echo ($vo["title"]); ?></span>
    </div>
	<div class="row-fluid operate">
		<div class="left">
			<a onclick="go_return_url();" class="btn">返回</a>
			<a href="#flow_status"  class="btn">裁决情况</a>
			<?php if(!empty($confirm)): ?><a href="#confirm"  class="btn">办理意见</a><?php endif; ?>
		</div>
		<div class="right"></div>
	</div>
	<form method='post' id="form_data" name="form_data" enctype="multipart/form-data">
		<input type="hidden" id="ajax" name="ajax" value="0">
		<input type="hidden" id="type" name="type" value="<?php echo ($flow_type["id"]); ?>">
		<input type="hidden" id="opmode" name="opmode" value="add">
		<input type="hidden" id="confirm" name="confirm" value="">
		<input type="hidden" id="consult" name="consult" value="">
		<input type="hidden" id="refer" name="refer" value="">
		<input type="hidden" id="step" name="step" value="">
		<div class="row-fluid form_box">
				<div class="row-fluid form-horizontal">
						<div class="control-group">
								<label class="control-label" for="title">文件编号：</label>
								<div class="controls">
										<?php echo ($vo["doc_no"]); ?>
								</div>
						</div>
				</div>
				<div class="row-fluid form-horizontal">
						<div class="control-group">
								<label class="control-label" for="title">日期：</label>
								<div class="controls">
										<?php echo (todate($vo["create_time"],'Y-m-d')); ?>
								</div>
						</div>
				</div>
				<div class="row-fluid form-horizontal">
						<div class="control-group">
								<label class="control-label" for="title">编写人：</label>
								<div class="controls">
										<?php echo ($vo["user_name"]); ?>
								</div>
						</div>
				</div>
				<div class="row-fluid form-horizontal">
						<div class="control-group">
								<label class="control-label" for="title">部门：</label>
								<div class="controls">
										<?php echo ($vo["dept_name"]); ?>
								</div>
						</div>
				</div>
				<div class="row-fluid form-horizontal">
						<div class="control-group">
								<label class="control-label" for="title">裁决：</label>
								<div class="controls">
										<?php echo ($vo["confirm_name"]); ?>
								</div>
						</div>
				</div>
				<div class="row-fluid form-horizontal">
						<div class="control-group">
								<label class="control-label" for="title">协商：</label>
								<div class="controls">
										<?php echo ($vo["consult_name"]); ?>
								</div>
						</div>
				</div>
				<div class="row-fluid form-horizontal">
						<div class="control-group">
								<label class="control-label" for="title">抄送：</label>
								<div class="controls">
										<?php echo (show_confirm($vo["refer"])); ?>
								</div>
						</div>
				</div>
				<div class="row-fluid form-horizontal">
						<div class="control-group">
								<div id="content_wrap" >
									<iframe id="content_iframe"></iframe>
								</div>
								<textarea id="content_1" name="content" style="width:100%;height:300px;"><?php echo ($vo["content"]); ?>
									</textarea>
						</div>
				</div>
				<div class="row-fluid form-horizontal">
						<div class="control-group">
								<label class="control-label" for="title">附件：</label>
								<div class="controls">
									<div id="uploader" style="position:relative;">
	<div class="table">
		<ul id="file_list">
			<?php if(!empty($file_list)): if(is_array($file_list)): $i = 0; $__LIST__ = $file_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$file): $mod = ($i % 2 );++$i;?><li class="tbody" id="<?php echo (f_encode($file["id"])); ?>" add_file="<?php echo (f_encode($file["id"])); ?>" size="<?php echo ($file["size"]); ?>" filename="<?php echo ($file["name"]); ?>">
						<div class="loading"></div>
						<div class="data">
							<span class="del text-center">
								<a class="link down" target="_blank" href="<?php echo U('down?attach_id='.f_encode($file['id']));?>">下载</a>
								</span>
							<span class="size text-right" ><?php echo (reunit($file["size"])); ?></span>
							<span class="auto autocut" title="<?php echo ($file["name"]); ?>"><?php echo ($file["name"]); ?>
							<?php if(($file["extension"]) == "mp4"): ?>(<a class="link down" target="_blank" onclick='winopen("<?php echo U("file/player?attach_id=".f_encode($file["id"]));?>",590,460)' >播放</a> )<?php endif; ?>
							</span>
						</div>
					</li><?php endforeach; endif; else: echo "" ;endif; endif; ?>
		</ul>
	</div>
</div>

								</div>
						</div>
				</div>
		</div>
	</form>
</div>
<div class="row-fluid title">
	<span><a name="flow_status"></a>裁决情况</span>
</div>
<div class="row-fluid table form_box">
	<ul>
		<li class="thead">
			<span style="width:90px;">类型</span>
			<span style="width:90px;">裁决人</span>
			<span style="width:90px;">日期</span>
			<span style="width:90px;">结果</span>
			<span class="auto">意见</span>
		</li>
		<?php if(is_array($flow_log)): $i = 0; $__LIST__ = $flow_log;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;?><li class="tbody">
				<span style="width:90px;" class="text-center"><?php echo (step_type($item["step"])); ?></span>
				<span style="width:90px;" class="text-center"><?php echo ($item["user_name"]); ?></span>
				<span style="width:90px;" class="text-center"><?php echo (todate($item["create_time"],'Y-m-d')); ?></span>
				<span style="width:90px;" class="text-center"><?php echo ($item["result"]); ?></span>
				<span class="auto">
					<div style="overflow:hidden">
						<?php echo ($item["comment"]); ?>
					</div></span>
			</li><?php endforeach; endif; else: echo "" ;endif; ?>
	</ul>
</div>
<?php if(!empty($confirm)): ?><div class="row-fluid title">
	<span><a name="confirm"></a>办理意见</span>
</div>
	<form method="post" action="" name="form_confirm" id="form_confirm">
		<input type="hidden" name="id" value="<?php echo ($confirm["id"]); ?>">
		<input type="hidden" name="flow_id" value="<?php echo ($vo["id"]); ?>">
		<input type="hidden" name="step" value="<?php echo ($confirm["step"]); ?>">
		<div class="operate row-fluid">
			<div class="left">
				<a onclick="go_return_url();" class="btn">返回</a>
			</div>
			<div class="right">
				<a onclick="approve();" class="btn">同意</a>
				<a onclick="reject();" class="btn">驳回</a>
			</div>
		</div>
		<div class="row-fluid form_box"> 
			<div class="row-fluid form-horizontal">
					<div class="control-group">
							<label class="control-label" for="title">办理意见：</label>
							<div class="controls">
									<textarea name="comment" class="span12" style="height:120px"></textarea>
									</gt>
							</div>
					</div>
			</div>
		</div><?php endif; ?>
</form>

</div>
		</div>
	</div>
	<div class="msg popout"></div>
	<iframe src="<?php echo U('push/client');?>" class="push" id="push"></iframe>
	<script src="__PUBLIC__/js/bootstrap.min.js"></script>
	<script src="__PUBLIC__/js/jquery-ui-1.9.2.custom.min.js"></script>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>